home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 17 / Developer Source Volume 17 (I-MODE Publications, Inc.)(2000).iso / visua / feb98 / swanf102.gif < prev    next >
Graphics Interchange Format  |  1998-06-08  |  22KB  |  622x337  |  4-bit (4 colors)
Labels: text | screenshot | font | number | parallel | black and white
OCR: Method Description MenuContainer getParent Returns the parent MenuContoiner object that owns this menu component. Usually, this will be a Menu or a Menubar object. (Hint: Use the instanceof keyword to defer- mine which type of object this method returns.) MenuComponentPeer gefPeer Returns the native peer component associated with this system-independent menu item. Because peer objects are necessarily system-dependent, you'll rarely, if ever, call this method. Font gelFont Returns the font used by the menu component or, if no font is set, by its parent container. void setFont(Font f) Changes the font used by this menu component. Each component may have a differ- ent font setting, though in most cases, the parent container will specify the font. void remove Notify Removes the peer object associated with this menu component. Applications should probably never call this method. boolean postEvent(Event evt) Posts a menu event such as the selection of a menu item. Applications don't need to call this method. String toString Returns a string representation of the menu component, which includes the class name, the component name, and any ossigned parameter. The parameter string is returned by the protected paramString method, which is overridden by extended class- es. For example, the Menullem class' paramString method returns a string in the form Label=label, where label is the menu item's text. The MenuComponent's toString method is useful for debugging. For example, you might use it to construct a List object of menu items for inspection. Figure 2: The methods of the abstract MenuComponent class.